package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxfw_travel_rotate;
import cn.bj.dao.Yxfw_travel_rotateMapper;

@Service
public class TravelRotateService {
	@Autowired
	Yxfw_travel_rotateMapper yxfw_travel_rotateMapper;

	// 查询所有
	public List<Yxfw_travel_rotate> selectAllTravelRotate() {
		return yxfw_travel_rotateMapper.selectByExample(null);
	}

	// 插入
	public int insertTravelRotate(Yxfw_travel_rotate travelRotate) {
		return yxfw_travel_rotateMapper.insert(travelRotate);
	}

	// 删除
	public int deleteTravelRotate(Integer id) {
		return yxfw_travel_rotateMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxfw_travel_rotate selectById(Integer id) {
		return yxfw_travel_rotateMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateTravelR(Yxfw_travel_rotate travelR) {
		return yxfw_travel_rotateMapper.updateByPrimaryKey(travelR);
	}

}
